package com.youi.shop.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 商品信息表
 * </p>
 *
 * @author xxf
 * @since 2020-11-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_product")
@ApiModel(value="Product对象", description="商品信息表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品主键")
    @TableId(value = "product_id", type = IdType.AUTO)
    private Long productId;

    @ApiModelProperty(value = "类别主键")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty(value = "商家用户主键")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "商品库存")
    @TableField("product_stock")
    private Integer productStock;

    @ApiModelProperty(value = "商品名称")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty(value = "图片")
    @TableField("product_image")
    private String productImage;

    @ApiModelProperty(value = "单价")
    @TableField("product_price")
    private BigDecimal productPrice;

    @ApiModelProperty(value = "商品描述")
    @TableField("product_description")
    private String productDescription;

    @ApiModelProperty(value = "详情标题")
    @TableField("detail_title")
    private String detailTitle;

    @ApiModelProperty(value = "详情描述")
    @TableField("detail_desc")
    private String detailDesc;

    @TableLogic
    @ApiModelProperty(value = "删除状态：0->未删除；1->已删除")
    @TableField("delete_status")
    private Integer deleteStatus;


}
